home *** CD-ROM | disk | FTP | other *** search
/ Giga Games 1 / Giga Games.iso / net / usenet / volume7 / nethack3 / patch7o < prev    next >
Encoding:
Internet Message Format  |  1990-02-26  |  60.0 KB

  1. Path: uunet!munnari.oz.au!uhccux!ames!think!zaphod.mps.ohio-state.edu!uakari!caesar.cs.montana.edu!milton!uw-beaver!zephyr.ens.tek.com!tekred!saab!billr
  2. From: billr@saab.CNA.TEK.COM (Bill Randle)
  3. Newsgroups: comp.sources.games
  4. Subject: v09i015:  NetHack3 -  display oriented dungeons & dragons (Ver. 3.0), Patch7o
  5. Message-ID: <5229@tekred.CNA.TEK.COM>
  6. Date: 24 Feb 90 00:58:25 GMT
  7. Sender: news@tekred.CNA.TEK.COM
  8. Lines: 2418
  9. Approved: billr@saab.CNA.TEK.COM
  10.  
  11. Submitted-by: Izchak Miller <izchak@linc.cis.upenn.edu>
  12. Posting-number: Volume 9, Issue 15
  13. Archive-name: NetHack3/Patch7o
  14. Patch-To: NetHack3: Volume 7, Issue 56-93
  15.  
  16.  
  17.  
  18. #! /bin/sh
  19. # This is a shell archive.  Remove anything before this line, then unpack
  20. # it by saving it into a file and typing "sh file".  To overwrite existing
  21. # files, type "sh file -c".  You can also feed this as standard input via
  22. # unshar, or by typing "sh <file", e.g..  If this archive is complete, you
  23. # will see the following message at the end:
  24. #        "End of archive 15 (of 30)."
  25. # Contents:  others/atari.cnf patch7.01
  26. # Wrapped by billr@saab on Wed Feb 21 10:04:36 1990
  27. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  28. if test -f 'others/atari.cnf' -a "${1}" != "-c" ; then 
  29.   echo shar: Renaming existing file \"'others/atari.cnf'\" to \"'others/atari.cnf.orig'\"
  30.   mv -f 'others/atari.cnf' 'others/atari.cnf.orig'
  31. fi
  32. echo shar: Extracting \"'others/atari.cnf'\" \(2801 characters\)
  33. sed "s/^X//" >'others/atari.cnf' <<'END_OF_FILE'
  34. X# A '#' at the beginning of a line means the rest of the line is a comment.
  35. X#
  36. X# This configuration file is set up for two cases, for a hard disk
  37. X# (as drive C:), and for one (double sided) floppy disk.
  38. X#
  39. X# To change the configuration, comment out the unwanted lines, and
  40. X# uncomment the configuration you want.
  41. X
  42. X
  43. X# *** OPTIONS ***
  44. X#
  45. X# If you want people to play NetHack over the modem, you should probably
  46. X# uncomment the following line:
  47. X#
  48. X#OPTIONS=!IBM_BIOS,number_pad,nocolor
  49. X#
  50. X# Some options to set personal preferences.  Uncomment and change these to
  51. X# suit your personal preference.  If several people are to use the same
  52. X# configuration, options like these should not be set.
  53. X#
  54. X#OPTIONS=name:Janet-V,female,dogname:Fido,catname:Morris,fruit:apricot
  55. X#OPTIONS=packorder:")[%?+/=!(*0_`,endgame:10 top/2 around/own
  56. X#
  57. X#
  58. X# Other general options.  You might also set "silent" so as not to attract
  59. X# the boss's attention.
  60. X#
  61. XOPTIONS=time,rest_on_space,nopickup
  62. X
  63. X# Color: if you have a color monitor and *don't* want colors, 
  64. X# comment out the following line. (Mono users don't get color no matter what.)
  65. X#
  66. X#OPTIONS=nocolor
  67. X
  68. X# *** HARD DISK CONFIGURATION ***
  69. X#
  70. X#HACKDIR=c:\games\nethack
  71. X#
  72. X#   LEVELS and SAVE default to HACKDIR
  73. X#
  74. X#LEVELS=c:\games\nethack
  75. X#   appending a ";n" to SAVE means don't prompt to insert a disk.
  76. X#SAVE=c:\games\nethack;n
  77. X#
  78. X# Using a ramdisk speeds things up; a 150K ramdisk is OK even on a 1 megabyte
  79. X# system.
  80. X#RAMDISK=m:
  81. X
  82. X
  83. X# *** 1-FLOPPY CONFIGURATION ***
  84. X#
  85. XHACKDIR=a:
  86. XLEVELS=a:
  87. XSAVE=a:
  88. X#RAMDISK=m:
  89. X
  90. X
  91. X# *** CHARACTER GRAPHICS ***
  92. X#
  93. X# The 35 GRAPHICS characters (0-34) are:
  94. X# stone, vertical wall, horizontal wall, top left corner, top right corner, 
  95. X# bottom left corner, bottom right corner, crosswall, up T wall, down T wall, 
  96. X# left T wall, right T wall, vertical beam, horizontal beam, left slant, right
  97. X# slant, no door, vertical open door, horizontal open door, floor, corridor,
  98. X# up stairs, down stairs, trap, web, pool, fountain, sink, throne, altar,
  99. X# up ladder, down ladder, vertical drawbridge wall, horizontal drawbridge wall 
  100. X#
  101. X# If you specify less than 35 ASCII values, the remaining characters will be
  102. X# set to their respective defaults.
  103. X#
  104. X#
  105. X# To use the Atari's (not very good) graphics character set, uncomment the
  106. X# next GRAPHICS= line:
  107. X#       ' '  |   -   .   .   `   '   -   -   -   -   -   |   -   \   /   .   -   |   +   .   #   <   >   ^   "   }   {   #   \   _   <   >   #   #
  108. X#GRAPHICS=042 124 045 169 170 045 045 043 045 045 045 045 124 045 092 047 249 251 251 252 250 240 174 175 222 223 247 221 189 196 227 243 242 178 179
  109. X#
  110. X# To use the font constructed by hackfnt.prg, uncomment the following line:
  111. X#GRAPHICS=032 217 218 194 195 192 193 216 197 196 199 198 217 218 092 047 202 201 201 200 202 203 210 211 207 206 214 204 205 208 209 212 213 215 215
  112. END_OF_FILE
  113. if test 2801 -ne `wc -c <'others/atari.cnf'`; then
  114.     echo shar: \"'others/atari.cnf'\" unpacked with wrong size!
  115. fi
  116. # end of 'others/atari.cnf'
  117. if test -f 'patch7.01' -a "${1}" != "-c" ; then 
  118.   echo shar: Renaming existing file \"'patch7.01'\" to \"'patch7.01.orig'\"
  119.   mv -f 'patch7.01' 'patch7.01.orig'
  120. fi
  121. echo shar: Extracting \"'patch7.01'\" \(53710 characters\)
  122. sed "s/^X//" >'patch7.01' <<'END_OF_FILE'
  123. X*** src/Old/Makefile.src    Mon Feb 19 17:52:09 1990
  124. X--- src/Makefile.src    Sun Feb  4 15:19:25 1990
  125. X***************
  126. X*** 102,109 ****
  127. X         gold.h hack.h lev.h macconf.h mfndpos.h mkroom.h monattk.h mondata.h\
  128. X         monflag.h monst.h monsym.h msdos.h obj.h objclass.h patchlevel.h\
  129. X         pcconf.h permonst.h prop.h rm.h sp_lev.h spell.h system.h termcap.h\
  130. X!        tosconf.h tradstdc.h trapname.h unixconf.h vault.h vmsconf.h wseg.h\
  131. X!        you.h youprop.h
  132. X  
  133. X  # all .h files except date.h, onames.h, pm.h & trap.h which would cause
  134. X  # dependency loops if run through "make depend".
  135. X--- 102,109 ----
  136. X         gold.h hack.h lev.h macconf.h mfndpos.h mkroom.h monattk.h mondata.h\
  137. X         monflag.h monst.h monsym.h msdos.h obj.h objclass.h patchlevel.h\
  138. X         pcconf.h permonst.h prop.h rm.h sp_lev.h spell.h system.h termcap.h\
  139. X!        tosconf.h tradstdc.h unixconf.h vault.h vmsconf.h wseg.h you.h\
  140. X!        youprop.h
  141. X  
  142. X  # all .h files except date.h, onames.h, pm.h & trap.h which would cause
  143. X  # dependency loops if run through "make depend".
  144. X***************
  145. X*** 409,415 ****
  146. X  topl.o:  ../include/hack.h
  147. X  topten.o:  ../include/hack.h
  148. X  track.o:  ../include/hack.h
  149. X! trap.o:  ../include/hack.h ../include/edog.h ../include/trapname.h
  150. X  u_init.o:  ../include/hack.h
  151. X  uhitm.o:  ../include/hack.h ../include/artifact.h
  152. X  vault.o:  ../include/hack.h ../include/vault.h
  153. X--- 409,415 ----
  154. X  topl.o:  ../include/hack.h
  155. X  topten.o:  ../include/hack.h
  156. X  track.o:  ../include/hack.h
  157. X! trap.o:  ../include/hack.h ../include/edog.h
  158. X  u_init.o:  ../include/hack.h
  159. X  uhitm.o:  ../include/hack.h ../include/artifact.h
  160. X  vault.o:  ../include/hack.h ../include/vault.h
  161. X*** src/Old/allmain.c    Mon Feb 19 17:52:35 1990
  162. X--- src/allmain.c    Thu Feb  8 17:49:16 1990
  163. X***************
  164. X*** 1,4 ****
  165. X! /*    SCCS Id: @(#)allmain.c    3.0    89/09/26
  166. X  /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
  167. X  /* NetHack may be freely redistributed.  See license for details. */
  168. X  
  169. X--- 1,4 ----
  170. X! /*    SCCS Id: @(#)allmain.c    3.0    89/12/22
  171. X  /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
  172. X  /* NetHack may be freely redistributed.  See license for details. */
  173. X  
  174. X***************
  175. X*** 10,17 ****
  176. X  #include <signal.h>
  177. X  #endif
  178. X  
  179. X! int (*afternmv)();
  180. X! int (*occupation)();
  181. X  
  182. X  void
  183. X  moveloop()
  184. X--- 10,21 ----
  185. X  #include <signal.h>
  186. X  #endif
  187. X  
  188. X! #ifdef OVLB
  189. X! int NDECL((*afternmv));
  190. X! int NDECL((*occupation));
  191. X! #endif
  192. X! 
  193. X! #ifdef OVL0
  194. X  
  195. X  void
  196. X  moveloop()
  197. X***************
  198. X*** 18,45 ****
  199. X  {
  200. X  #ifdef MSDOS
  201. X      char ch;
  202. X!     int abort;
  203. X  #endif
  204. X  
  205. X      for(;;) {
  206. X  #ifdef MACOS
  207. X!     if (!(moves % 20)) {
  208. X!         UnloadSeg(doapply);
  209. X!         UnloadSeg(initedog);
  210. X          UnloadSeg(doeat);
  211. X!         UnloadSeg(doengrave);
  212. X!         UnloadSeg(doopen);
  213. X!         UnloadSeg(mattacku);
  214. X!         UnloadSeg(mklev);
  215. X!         UnloadSeg(attacktype);
  216. X!         UnloadSeg(dohelp);
  217. X!         UnloadSeg(dopray);
  218. X!         UnloadSeg(dorecover);
  219. X!         UnloadSeg(timeout);
  220. X!         UnloadSeg(setworn);
  221. X          UnloadSeg(initterm);
  222. X!         UnloadSeg(done);
  223. X          UnloadSeg(savebones);
  224. X      }
  225. X  #endif
  226. X  #ifdef CLIPPING
  227. X--- 22,78 ----
  228. X  {
  229. X  #ifdef MSDOS
  230. X      char ch;
  231. X!     int abort_lev;
  232. X  #endif
  233. X  
  234. X      for(;;) {
  235. X  #ifdef MACOS
  236. X!     static    int old_dlevel = 0;
  237. X!     extern    xchar dlevel; 
  238. X!     extern    Boolean    lowMem;
  239. X!     extern    long    lowMemLimit;
  240. X!     if (!(moves % 20) || lowMem || FreeMem() < lowMemLimit || old_dlevel != dlevel) {
  241. X!         old_dlevel = dlevel;
  242. X!         UnloadSeg(ddocall);
  243. X!         UnloadSeg(castmu);
  244. X!         UnloadSeg(doforce);
  245. X          UnloadSeg(doeat);
  246. X!         UnloadSeg(dozap);
  247. X          UnloadSeg(initterm);
  248. X!         UnloadSeg(doapply);
  249. X!         UnloadSeg(dokick);
  250. X!         UnloadSeg(outrumor);
  251. X!         UnloadSeg(steal);
  252. X!         UnloadSeg(done1);
  253. X!         UnloadSeg(dodrink);
  254. X!         UnloadSeg(doturn);
  255. X! #ifdef REINCARNATION
  256. X!         UnloadSeg(makeroguerooms);
  257. X! #endif
  258. X! #ifdef STRONGHOLD
  259. X!         UnloadSeg(load_special);
  260. X! #endif
  261. X!         UnloadSeg(mklev);
  262. X! #ifdef MUSIC
  263. X!         UnloadSeg(do_play_instrument);
  264. X! #endif
  265. X! #ifdef SPELLS
  266. X!         UnloadSeg(docast);
  267. X! #endif
  268. X          UnloadSeg(savebones);
  269. X+         UnloadSeg(expels);
  270. X+         UnloadSeg(attack);
  271. X+         UnloadSeg(doname);
  272. X+         if (FreeMem() < 36864)
  273. X+         {
  274. X+             long    space;
  275. X+             
  276. X+             UnloadSeg(newhp);
  277. X+             UnloadSeg(attack);
  278. X+ 
  279. X+             space = 0x7FFFFFFFL;
  280. X+             MaxMem(&space);
  281. X+         }
  282. X      }
  283. X  #endif
  284. X  #ifdef CLIPPING
  285. X***************
  286. X*** 163,185 ****
  287. X  
  288. X          if(multi >= 0 && occupation) {
  289. X  #ifdef MSDOS
  290. X!             abort = 0;
  291. X              if (kbhit()) {
  292. X                  if ((ch = Getchar()) == ABORT)
  293. X!                     abort++;
  294. X  # ifdef REDO
  295. X                  else
  296. X                      pushch(ch);
  297. X  # endif /* REDO */
  298. X              }
  299. X!             if(abort || monster_nearby()) {
  300. X  #else
  301. X              if(monster_nearby()) {
  302. X  #endif
  303. X                  stop_occupation();
  304. X                  reset_eat();
  305. X!             } else if ((*occupation)() == 0)
  306. X!                 occupation = 0;
  307. X  #ifdef MSDOS
  308. X              if (!(++occtime % 7))
  309. X                  (void) fflush(stdout);
  310. X--- 196,223 ----
  311. X  
  312. X          if(multi >= 0 && occupation) {
  313. X  #ifdef MSDOS
  314. X!             abort_lev = 0;
  315. X              if (kbhit()) {
  316. X                  if ((ch = Getchar()) == ABORT)
  317. X!                     abort_lev++;
  318. X  # ifdef REDO
  319. X                  else
  320. X                      pushch(ch);
  321. X  # endif /* REDO */
  322. X              }
  323. X!             if (!abort_lev && (*occupation)() == 0)
  324. X! #else
  325. X!             if ((*occupation)() == 0)
  326. X! #endif
  327. X!                 occupation = 0;
  328. X! #ifdef MSDOS
  329. X!             if(abort_lev || monster_nearby()) {
  330. X  #else
  331. X              if(monster_nearby()) {
  332. X  #endif
  333. X                  stop_occupation();
  334. X                  reset_eat();
  335. X!             }
  336. X  #ifdef MSDOS
  337. X              if (!(++occtime % 7))
  338. X                  (void) fflush(stdout);
  339. X***************
  340. X*** 219,224 ****
  341. X--- 257,265 ----
  342. X      }
  343. X  }
  344. X  
  345. X+ #endif /* OVL0 */
  346. X+ #ifdef OVL1
  347. X+ 
  348. X  void
  349. X  stop_occupation()
  350. X  {
  351. X***************
  352. X*** 225,230 ****
  353. X--- 266,272 ----
  354. X      if(occupation) {
  355. X          You("stop %s.", occtxt);
  356. X          occupation = 0;
  357. X+         sync_hunger();
  358. X  #ifdef REDO
  359. X          multi = 0;
  360. X          pushch(0);
  361. X***************
  362. X*** 232,237 ****
  363. X--- 274,282 ----
  364. X      }
  365. X  }
  366. X  
  367. X+ #endif /* OVL1 */
  368. X+ #ifdef OVLB
  369. X+ 
  370. X  void
  371. X  newgame() {
  372. X  #ifdef DGK
  373. X***************
  374. X*** 278,280 ****
  375. X--- 323,327 ----
  376. X  
  377. X      return;
  378. X  }
  379. X+ 
  380. X+ #endif /* OVLB */
  381. X*** src/Old/alloc.c    Mon Feb 19 17:52:52 1990
  382. X--- src/alloc.c    Tue Jan 16 18:11:28 1990
  383. X***************
  384. X*** 7,12 ****
  385. X--- 7,13 ----
  386. X   */
  387. X  #define EXTERN_H
  388. X  #include "config.h"
  389. X+ long *FDECL(alloc,(unsigned int));
  390. X  
  391. X  #ifdef LINT
  392. X  /*
  393. X***************
  394. X*** 23,29 ****
  395. X  
  396. X  #else
  397. X  #ifndef __TURBOC__
  398. X! extern void VDECL(panic, (char *,...));
  399. X  
  400. X  long *
  401. X  alloc(lth)
  402. X--- 24,30 ----
  403. X  
  404. X  #else
  405. X  #ifndef __TURBOC__
  406. X! extern void VDECL(panic, (const char *,...));
  407. X  
  408. X  long *
  409. X  alloc(lth)
  410. X*** src/Old/apply.c    Mon Feb 19 17:53:07 1990
  411. X--- src/apply.c    Mon Feb  5 18:08:55 1990
  412. X***************
  413. X*** 2,9 ****
  414. X  /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
  415. X  /* NetHack may be freely redistributed.  See license for details. */
  416. X  
  417. X  /* block some unused #defines to avoid overloading some cpp's */
  418. X- #define MONATTK_H
  419. X  #include    "hack.h"
  420. X  #include    "edog.h"
  421. X  
  422. X--- 2,9 ----
  423. X  /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
  424. X  /* NetHack may be freely redistributed.  See license for details. */
  425. X  
  426. X+ #define MONATTK_H    /* comment line for pre-compiled headers */
  427. X  /* block some unused #defines to avoid overloading some cpp's */
  428. X  #include    "hack.h"
  429. X  #include    "edog.h"
  430. X  
  431. X***************
  432. X*** 11,20 ****
  433. X--- 11,40 ----
  434. X  #define IS_INSTRUMENT(typ)    ((typ) >= FLUTE && (typ) <= DRUM_OF_EARTHQUAKE)
  435. X  #endif /* MUSIC /**/
  436. X  
  437. X+ #ifdef OVLB
  438. X+ 
  439. X  static const char tools[] = { TOOL_SYM, 0 };
  440. X  
  441. X  static boolean did_dig_msg;
  442. X  
  443. X+ static struct monst *FDECL(bchit, (int, int, int, CHAR_P));
  444. X+ static void FDECL(use_camera, (struct obj *));
  445. X+ static void FDECL(use_stethoscope, (struct obj *));
  446. X+ static void FDECL(use_whistle, (struct obj *));
  447. X+ static void FDECL(use_magic_whistle, (struct obj *));
  448. X+ #ifdef WALKIES
  449. X+ static void FDECL(use_leash, (struct obj *));
  450. X+ #endif
  451. X+ OSTATIC int NDECL(dig);
  452. X+ static boolean FDECL(wield_tool, (struct obj *));
  453. X+ static int FDECL(use_pick_axe, (struct obj *));
  454. X+ #ifdef MEDUSA
  455. X+ static void FDECL(use_mirror, (struct obj *));
  456. X+ #endif
  457. X+ static void FDECL(use_lamp, (struct obj *));
  458. X+ static void FDECL(use_crystal_ball, (struct obj *));
  459. X+ static void FDECL(use_tinning_kit, (struct obj *));
  460. X+ 
  461. X  /* version of bhit for cameras and mirrors */
  462. X  static
  463. X  struct monst *
  464. X***************
  465. X*** 35,44 ****
  466. X              mtmp = m_at(bchx,bchy);
  467. X              break;
  468. X          }
  469. X!         if(!ZAP_POS(levl[bchx][bchy].typ) ||
  470. X!             (IS_DOOR(levl[bchx][bchy].typ) &&
  471. X!                 (levl[bchx][bchy].doormask & (D_CLOSED | D_LOCKED)))
  472. X!           ) {
  473. X              bchx -= ddx;
  474. X              bchy -= ddy;
  475. X              break;
  476. X--- 55,61 ----
  477. X              mtmp = m_at(bchx,bchy);
  478. X              break;
  479. X          }
  480. X!         if(!ZAP_POS(levl[bchx][bchy].typ) || closed_door(bchx, bchy)) {
  481. X              bchx -= ddx;
  482. X              bchy -= ddy;
  483. X              break;
  484. X***************
  485. X*** 57,63 ****
  486. X          return;
  487. X      }
  488. X      if(u.uswallow) {
  489. X!         You("take a picture of %s's stomach.", mon_nam(u.ustuck));
  490. X          return;
  491. X      }
  492. X      if(obj->cursed && !rn2(2)) goto blindu;
  493. X--- 74,81 ----
  494. X          return;
  495. X      }
  496. X      if(u.uswallow) {
  497. X!         You("take a picture of %s's %s.", mon_nam(u.ustuck),
  498. X!             is_animal(u.ustuck->data)? "stomach" : "interior");
  499. X          return;
  500. X      }
  501. X      if(obj->cursed && !rn2(2)) goto blindu;
  502. X***************
  503. X*** 216,224 ****
  504. X--- 234,246 ----
  505. X      return(abs(u.ux - x) > n  || abs(u.uy - y) > n);
  506. X  }
  507. X  
  508. X+ #endif /* OVLB */
  509. X+ 
  510. X  #ifdef WALKIES
  511. X  #define MAXLEASHED    2
  512. X  
  513. X+ #ifdef OVLB
  514. X+ 
  515. X  int
  516. X  number_leashed()
  517. X  {
  518. X***************
  519. X*** 369,375 ****
  520. X      }
  521. X      return((struct obj *)0);
  522. X  }
  523. X! 
  524. X  void
  525. X  check_leash(x, y)
  526. X  register xchar x, y;
  527. X--- 391,400 ----
  528. X      }
  529. X      return((struct obj *)0);
  530. X  }
  531. X! #endif /* WALKIES */
  532. X! #endif /* OVLB */
  533. X! #ifdef OVL0
  534. X! #ifdef WALKIES
  535. X  void
  536. X  check_leash(x, y)
  537. X  register xchar x, y;
  538. X***************
  539. X*** 415,425 ****
  540. X          }
  541. X          }
  542. X  }
  543. X  #endif /* WALKIES */
  544. X  
  545. X! #ifndef OVERLAY
  546. X! static 
  547. X! #endif
  548. X  int
  549. X  dig() {
  550. X      register struct rm *lev;
  551. X--- 440,452 ----
  552. X          }
  553. X          }
  554. X  }
  555. X+ 
  556. X  #endif /* WALKIES */
  557. X  
  558. X! #endif /* OVL0 */
  559. X! #ifdef OVLB
  560. X! 
  561. X! XSTATIC
  562. X  int
  563. X  dig() {
  564. X      register struct rm *lev;
  565. X***************
  566. X*** 484,490 ****
  567. X          }
  568. X      } else
  569. X      if(dig_effort > 100) {
  570. X!         register char *digtxt;
  571. X          register struct obj *obj;
  572. X  
  573. X          if(obj = sobj_at(STATUE, dpx, dpy)) {
  574. X--- 511,517 ----
  575. X          }
  576. X      } else
  577. X      if(dig_effort > 100) {
  578. X!         register const char *digtxt;
  579. X          register struct obj *obj;
  580. X  
  581. X          if(obj = sobj_at(STATUE, dpx, dpy)) {
  582. X***************
  583. X*** 516,523 ****
  584. X              digtxt = "You just broke through a secret door.";
  585. X              if(!(lev->doormask & D_TRAPPED))
  586. X                  lev->doormask = D_BROKEN;
  587. X!         } else if (IS_DOOR(lev->typ) &&
  588. X!                (lev->doormask & (D_CLOSED | D_LOCKED))) {
  589. X              digtxt = "You just broke a hole through the door.";
  590. X              if(!(lev->doormask & D_TRAPPED))
  591. X                  lev->doormask = D_BROKEN;
  592. X--- 543,549 ----
  593. X              digtxt = "You just broke through a secret door.";
  594. X              if(!(lev->doormask & D_TRAPPED))
  595. X                  lev->doormask = D_BROKEN;
  596. X!         } else if(closed_door(dpx, dpy)) {
  597. X              digtxt = "You just broke a hole through the door.";
  598. X              if(!(lev->doormask & D_TRAPPED))
  599. X                  lev->doormask = D_BROKEN;
  600. X***************
  601. X*** 534,541 ****
  602. X          dig_level = -1;
  603. X          return(0);
  604. X      } else {
  605. X!         if(IS_WALL(lev->typ) ||
  606. X!          (IS_DOOR(lev->typ) && lev->doormask & (D_CLOSED | D_LOCKED))) {
  607. X              register int rno = inroom(dpx,dpy);
  608. X  
  609. X              if(rno >= 0 && rooms[rno].rtype >= SHOPBASE) {
  610. X--- 560,566 ----
  611. X          dig_level = -1;
  612. X          return(0);
  613. X      } else {
  614. X!         if(IS_WALL(lev->typ) || closed_door(dpx, dpy)) {
  615. X              register int rno = inroom(dpx,dpy);
  616. X  
  617. X              if(rno >= 0 && rooms[rno].rtype >= SHOPBASE) {
  618. X***************
  619. X*** 676,687 ****
  620. X      if(u.uswallow && attack(u.ustuck)) /* return(1) */;
  621. X      else if(u.dz < 0) You("cannot reach the ceiling.");
  622. X      else if(!u.dx && !u.dy && !u.dz) {
  623. X          int dam;
  624. X  
  625. X!         dam = rnd(2) + dbon();
  626. X          if (dam <= 0) dam = 1;
  627. X          You("hit yourself with your own pick-axe.");
  628. X!         losehp(dam, "self-inflicted wound");
  629. X          flags.botl=1;
  630. X          return(1);
  631. X      } else if(u.dz == 0) {
  632. X--- 701,716 ----
  633. X      if(u.uswallow && attack(u.ustuck)) /* return(1) */;
  634. X      else if(u.dz < 0) You("cannot reach the ceiling.");
  635. X      else if(!u.dx && !u.dy && !u.dz) {
  636. X+         char buf[BUFSZ];
  637. X          int dam;
  638. X  
  639. X!         dam = rnd(2) + dbon() + obj->spe;
  640. X          if (dam <= 0) dam = 1;
  641. X          You("hit yourself with your own pick-axe.");
  642. X!         /* self_pronoun() won't work twice in a sentence */
  643. X!         Strcpy(buf, self_pronoun("killed %sself with %%s own pick-axe",
  644. X!             "him"));
  645. X!         losehp(dam, self_pronoun(buf, "his"), NO_KILLER_PREFIX);
  646. X          flags.botl=1;
  647. X          return(1);
  648. X      } else if(u.dz == 0) {
  649. X***************
  650. X*** 695,705 ****
  651. X              pline("Clash!");
  652. X              return(1);
  653. X          }
  654. X!         isclosedoor = (IS_DOOR(lev->typ) &&
  655. X!                    (lev->doormask & (D_CLOSED | D_LOCKED)));
  656. X          if(!IS_ROCK(lev->typ)
  657. X!              && (!IS_DOOR(lev->typ) || (lev->doormask==D_NODOOR
  658. X!             || lev->doormask & (D_ISOPEN | D_BROKEN)))
  659. X               && !sobj_at(STATUE, rx, ry)
  660. X               && !sobj_at(BOULDER, rx, ry)) {
  661. X              /* ACCESSIBLE or POOL */
  662. X--- 724,732 ----
  663. X              pline("Clash!");
  664. X              return(1);
  665. X          }
  666. X!         isclosedoor = closed_door(rx, ry);
  667. X          if(!IS_ROCK(lev->typ)
  668. X!              && !isclosedoor
  669. X               && !sobj_at(STATUE, rx, ry)
  670. X               && !sobj_at(BOULDER, rx, ry)) {
  671. X              /* ACCESSIBLE or POOL */
  672. X***************
  673. X*** 806,812 ****
  674. X                  (poly_gender()==1 ? "beautiful" : "handsome") :
  675. X                  "ugly");
  676. X          } else {
  677. X!         if (rn2(4-u.uluck/3) || !HTelepat ||
  678. X              (u.ukilled_medusa
  679. X  #ifdef HARD
  680. X              && u.udemigod
  681. X--- 833,839 ----
  682. X                  (poly_gender()==1 ? "beautiful" : "handsome") :
  683. X                  "ugly");
  684. X          } else {
  685. X!         if (Luck <= 10 && rn2(4-Luck/3) || !HTelepat ||
  686. X              (u.ukilled_medusa
  687. X  #ifdef HARD
  688. X              && u.udemigod
  689. X***************
  690. X*** 819,825 ****
  691. X                  body_part(FACE));
  692. X          } else {
  693. X              static char buf[35];
  694. X!             char *tm, *tl; int ll;
  695. X              if (!u.ukilled_medusa && rn2(4)) {
  696. X                  tm = "n ugly snake-headed monster";
  697. X                  ll = dlevel - medusa_level;
  698. X--- 846,852 ----
  699. X                  body_part(FACE));
  700. X          } else {
  701. X              static char buf[35];
  702. X!             const char *tm, *tl; int ll;
  703. X              if (!u.ukilled_medusa && rn2(4)) {
  704. X                  tm = "n ugly snake-headed monster";
  705. X                  ll = dlevel - medusa_level;
  706. X***************
  707. X*** 847,853 ****
  708. X          return;
  709. X      }
  710. X      if(u.uswallow) {
  711. X!         You("reflect %s's stomach.", mon_nam(u.ustuck));
  712. X          return;
  713. X      }
  714. X      if(u.dz) {
  715. X--- 874,881 ----
  716. X          return;
  717. X      }
  718. X      if(u.uswallow) {
  719. X!         You("reflect %s's %s.", mon_nam(u.ustuck), 
  720. X!             is_animal(u.ustuck->data)? "stomach" : "interior");
  721. X          return;
  722. X      }
  723. X      if(u.dz) {
  724. X***************
  725. X*** 879,890 ****
  726. X          killed(mtmp);
  727. X      } else if(!mtmp->mcan && !mtmp->minvis &&
  728. X                      mtmp->data == &mons[PM_FLOATING_EYE]) {
  729. X      /* Note: floating eyes cannot use their abilities while invisible,
  730. X       * but medusas and umber hulks can.
  731. X       */
  732. X          if (!Blind)
  733. X              pline("%s is frozen by its reflection.",Monnam(mtmp));
  734. X!         mtmp->mfroz = 1;
  735. X      } else if(!mtmp->mcan && mtmp->data == &mons[PM_UMBER_HULK]) {
  736. X          if (!Blind)
  737. X              pline ("%s has confused itself!", Monnam(mtmp));
  738. X--- 907,923 ----
  739. X          killed(mtmp);
  740. X      } else if(!mtmp->mcan && !mtmp->minvis &&
  741. X                      mtmp->data == &mons[PM_FLOATING_EYE]) {
  742. X+         int tmp = d((int)mtmp->m_lev, (int)mtmp->data->mattk[0].damd);
  743. X+         if (!rn2(4)) tmp = 120;
  744. X      /* Note: floating eyes cannot use their abilities while invisible,
  745. X       * but medusas and umber hulks can.
  746. X       */
  747. X          if (!Blind)
  748. X              pline("%s is frozen by its reflection.",Monnam(mtmp));
  749. X!         mtmp->mcanmove = 0;
  750. X!         if (mtmp->mfrozen + tmp > 127)
  751. X!             mtmp->mfrozen = 127;
  752. X!         else mtmp->mfrozen += tmp;
  753. X      } else if(!mtmp->mcan && mtmp->data == &mons[PM_UMBER_HULK]) {
  754. X          if (!Blind)
  755. X              pline ("%s has confused itself!", Monnam(mtmp));
  756. X***************
  757. X*** 898,903 ****
  758. X--- 931,937 ----
  759. X                  pline ("%s looks beautiful in your mirror.",Monnam(mtmp));
  760. X                  pline ("She decides to take it!");
  761. X          } else pline ("It steals your mirror!");
  762. X+         setnotworn(obj); /* in case mirror was wielded */
  763. X              freeinv(obj);
  764. X              mpickobj(mtmp,obj);
  765. X              rloc(mtmp);
  766. X***************
  767. X*** 967,973 ****
  768. X              break;
  769. X          case 5 : pline("The crystal ball explodes!");
  770. X              useup(obj);
  771. X!             losehp(rnd(30), "exploding crystal ball");
  772. X              break;
  773. X          }
  774. X          obj->spe -= 1;
  775. X--- 1001,1008 ----
  776. X              break;
  777. X          case 5 : pline("The crystal ball explodes!");
  778. X              useup(obj);
  779. X!             losehp(rnd(30), "exploding crystal ball",
  780. X!                 KILLED_BY_AN);
  781. X              break;
  782. X          }
  783. X          obj->spe -= 1;
  784. X***************
  785. X*** 1119,1125 ****
  786. X       */
  787. X      if (!(corpse = floorfood("can", 1))) return;
  788. X      if (corpse->oeaten) {
  789. X!         pline("You cannot tin something which is partly eaten.");
  790. X          return;
  791. X      }
  792. X      if ((corpse->corpsenm == PM_COCKATRICE)
  793. X--- 1154,1160 ----
  794. X       */
  795. X      if (!(corpse = floorfood("can", 1))) return;
  796. X      if (corpse->oeaten) {
  797. X!         You("cannot tin something which is partly eaten.");
  798. X          return;
  799. X      }
  800. X      if ((corpse->corpsenm == PM_COCKATRICE)
  801. X***************
  802. X*** 1129,1137 ****
  803. X          && !uarmg) {
  804. X  pline("Tinning a cockatrice corpse without gloves was not a very wise move...");
  805. X          You("turn to stone...");
  806. X!         killer = "unwise tinning decision";
  807. X          done(STONING);
  808. X      }
  809. X      can = mksobj(TIN,FALSE);
  810. X      can->corpsenm = corpse->corpsenm;
  811. X      can->quan = 1; /* Defeat the occasional creation of pairs of tins */
  812. X--- 1164,1177 ----
  813. X          && !uarmg) {
  814. X  pline("Tinning a cockatrice corpse without gloves was not a very wise move...");
  815. X          You("turn to stone...");
  816. X!         killer_format = KILLED_BY;
  817. X!         killer = "trying to tin a cockatrice without gloves";
  818. X          done(STONING);
  819. X      }
  820. X+     if (mons[corpse->corpsenm].cnutrit == 0) {
  821. X+         You("can't tin something that insubstantial!");
  822. X+         return;
  823. X+     }
  824. X      can = mksobj(TIN,FALSE);
  825. X      can->corpsenm = corpse->corpsenm;
  826. X      can->quan = 1; /* Defeat the occasional creation of pairs of tins */
  827. X***************
  828. X*** 1150,1165 ****
  829. X  use_unicorn_horn(obj)
  830. X  struct obj *obj;
  831. X  {
  832. X-     boolean cursed = (obj && obj->cursed);
  833. X      boolean blessed = (obj && obj->blessed);
  834. X      boolean did_something = FALSE;
  835. X  
  836. X!     if (cursed) {
  837. X          switch (rn2(6)) {
  838. X              static char buf[BUFSZ];
  839. X              case 0: make_sick(Sick ? 1L : (long)(20 + rn2(20)), TRUE);
  840. X                  Strcpy(buf, xname(obj));
  841. X!                 u.usick_cause = buf;
  842. X                  break;
  843. X              case 1: make_blinded(Blinded + (long) rnd(100), TRUE);
  844. X                  break;
  845. X--- 1190,1204 ----
  846. X  use_unicorn_horn(obj)
  847. X  struct obj *obj;
  848. X  {
  849. X      boolean blessed = (obj && obj->blessed);
  850. X      boolean did_something = FALSE;
  851. X  
  852. X!     if (obj && obj->cursed) {
  853. X          switch (rn2(6)) {
  854. X              static char buf[BUFSZ];
  855. X              case 0: make_sick(Sick ? 1L : (long)(20 + rn2(20)), TRUE);
  856. X                  Strcpy(buf, xname(obj));
  857. X!                 u.usick_cause = (const char *)buf;
  858. X                  break;
  859. X              case 1: make_blinded(Blinded + (long) rnd(100), TRUE);
  860. X                  break;
  861. X***************
  862. X*** 1191,1196 ****
  863. X--- 1230,1239 ----
  864. X          make_hallucinated(0L, TRUE);
  865. X          did_something++;
  866. X      }
  867. X+     if (Vomiting && (!did_something || blessed)) {
  868. X+         make_vomiting(0L, TRUE);
  869. X+         did_something++;
  870. X+     }
  871. X      if (HConfusion && (!did_something || blessed)) {
  872. X          make_confused(0L, TRUE);
  873. X          did_something++;
  874. X***************
  875. X*** 1303,1309 ****
  876. X              You("have no tin to open.");
  877. X              goto xit;
  878. X          }
  879. X!         You("cannot open a tin without eating its contents.");
  880. X          if(flags.verbose)
  881. X              pline("In order to eat, use the 'e' command.");
  882. X          if(obj != uwep)
  883. X--- 1346,1352 ----
  884. X              You("have no tin to open.");
  885. X              goto xit;
  886. X          }
  887. X!         You("cannot open a tin without eating or discarding its contents.");
  888. X          if(flags.verbose)
  889. X              pline("In order to eat, use the 'e' command.");
  890. X          if(obj != uwep)
  891. X***************
  892. X*** 1339,1341 ****
  893. X--- 1382,1386 ----
  894. X      nomul(0);
  895. X      return res;
  896. X  }
  897. X+ 
  898. X+ #endif /* OVLB */
  899. X*** src/Old/artifact.c    Mon Feb 19 17:53:57 1990
  900. X--- src/artifact.c    Mon Feb  5 18:08:58 1990
  901. X***************
  902. X*** 8,15 ****
  903. X  
  904. X  #include "artifact.h"
  905. X  
  906. X  /* the artifacts (currently weapons only) */
  907. X! static const struct artifact artilist[] = {
  908. X  
  909. X  #define        NO_ATTK    { 0, 0, 0, 0 }
  910. X  
  911. X--- 8,21 ----
  912. X  
  913. X  #include "artifact.h"
  914. X  
  915. X+ #ifndef OVLB
  916. X+ 
  917. X+ OSTATIC const struct artifact artilist[];
  918. X+ 
  919. X+ #else /* OVLB */
  920. X+ 
  921. X  /* the artifacts (currently weapons only) */
  922. X! XSTATIC const struct artifact artilist[] = {
  923. X  
  924. X  #define        NO_ATTK    { 0, 0, 0, 0 }
  925. X  
  926. X***************
  927. X*** 64,70 ****
  928. X                                  SPFX_DRLI), 0,
  929. X    { 0, AD_DRLI, 5, 2 }, { 0, AD_DRLI, 0, 0 }, A_CHAOS, 0 },
  930. X  
  931. X! { LONG_SWORD,     "Sunsword",    (SPFX_RESTR | SPFX_DFLAG1), M1_UNDEAD,
  932. X    { 0, AD_PHYS, 5, 0 }, NO_ATTK, A_LAW, 0 },
  933. X  
  934. X  { BROADSWORD,     "Dragonbane",    (SPFX_RESTR | SPFX_DCLAS), S_DRAGON,
  935. X--- 70,76 ----
  936. X                                  SPFX_DRLI), 0,
  937. X    { 0, AD_DRLI, 5, 2 }, { 0, AD_DRLI, 0, 0 }, A_CHAOS, 0 },
  938. X  
  939. X! { LONG_SWORD,     "Sunsword",    (SPFX_RESTR | SPFX_DFLAG2), M2_UNDEAD,
  940. X    { 0, AD_PHYS, 5, 0 }, NO_ATTK, A_LAW, 0 },
  941. X  
  942. X  { BROADSWORD,     "Dragonbane",    (SPFX_RESTR | SPFX_DCLAS), S_DRAGON,
  943. X***************
  944. X*** 74,80 ****
  945. X    { 0, AD_PHYS, 5, 0 }, NO_ATTK, A_LAW, 0 },
  946. X  
  947. X  /* A silver weapon would be appropriate, if we had one. */
  948. X! { LONG_SWORD,     "Werebane",    (SPFX_RESTR | SPFX_DFLAG1), M1_WERE,
  949. X    { 0, AD_PHYS, 5, 0 }, NO_ATTK, A_LAW, 0 },
  950. X  
  951. X  { LONG_SWORD,     "Giantslayer", (SPFX_RESTR | SPFX_DFLAG2), M2_GIANT,
  952. X--- 80,86 ----
  953. X    { 0, AD_PHYS, 5, 0 }, NO_ATTK, A_LAW, 0 },
  954. X  
  955. X  /* A silver weapon would be appropriate, if we had one. */
  956. X! { LONG_SWORD,     "Werebane",    (SPFX_RESTR | SPFX_DFLAG2), M2_WERE,
  957. X    { 0, AD_PHYS, 5, 0 }, NO_ATTK, A_LAW, 0 },
  958. X  
  959. X  { LONG_SWORD,     "Giantslayer", (SPFX_RESTR | SPFX_DFLAG2), M2_GIANT,
  960. X***************
  961. X*** 97,102 ****
  962. X--- 103,130 ----
  963. X  { 0,  "", 0, 0, NO_ATTK, NO_ATTK, 0, 0 }
  964. X  };
  965. X  
  966. X+ const int artifact_num = SIZE(artilist);
  967. X+ 
  968. X+ /* this array gets saved / restored - thus not static */
  969. X+ boolean artiexist[SIZE(artilist)];
  970. X+ 
  971. X+ #endif /* OVLB */
  972. X+ 
  973. X+ OSTATIC const struct artifact *FDECL(get_artifact, (struct obj *));
  974. X+ OSTATIC int FDECL(spec_applies, (const struct artifact *, struct permonst *));
  975. X+ 
  976. X+ #ifdef OVLB
  977. X+ 
  978. X+ /* zero out the artifact exist list */
  979. X+ void
  980. X+ init_exists()
  981. X+ {
  982. X+     int i;
  983. X+ 
  984. X+     for(i = 0; i < SIZE(artilist); i++)
  985. X+         artiexist[i] = 0;
  986. X+ }
  987. X+ 
  988. X  void
  989. X  mkartifact(otmp1)
  990. X  struct obj **otmp1;
  991. X***************
  992. X*** 103,125 ****
  993. X  {
  994. X      register const struct artifact *artif;
  995. X      register struct obj *otmp = *otmp1;
  996. X!     register int n = 0;
  997. X  
  998. X!     for(artif = artilist; artif->otyp; artif++)
  999. X!         if(otmp->otyp == artif->otyp && !(artif->spfx & SPFX_NOGEN)) n++;
  1000. X  
  1001. X      if (n) {
  1002. X          n = rnd(n);
  1003. X!         for(artif = artilist; artif->otyp && n > 0; ) {
  1004. X!             if(otmp->otyp == artif->otyp && !(artif->spfx & SPFX_NOGEN)) n--;
  1005. X!             if (n>0) artif++;
  1006. X          }
  1007. X  
  1008. X!         if(artif->otyp) *otmp1 = oname(otmp, artif->name, 0);
  1009. X      }
  1010. X  }
  1011. X  
  1012. X! static struct artifact *
  1013. X  get_artifact(otmp)
  1014. X  struct obj *otmp;
  1015. X  {
  1016. X--- 131,164 ----
  1017. X  {
  1018. X      register const struct artifact *artif;
  1019. X      register struct obj *otmp = *otmp1;
  1020. X!     register int n = 0, m;
  1021. X  
  1022. X!     for(artif = artilist,m = 0; artif->otyp; artif++,m++)
  1023. X!         if(otmp->otyp == artif->otyp && !(artif->spfx & SPFX_NOGEN) &&
  1024. X!            !artiexist[m]) n++;
  1025. X  
  1026. X      if (n) {
  1027. X          n = rnd(n);
  1028. X!         for(artif = artilist,m = 0; artif->otyp && n > 0; ) {
  1029. X!             if(otmp->otyp == artif->otyp && !(artif->spfx & SPFX_NOGEN) &&
  1030. X!                !artiexist[m]) n--;
  1031. X!             if (n > 0) {
  1032. X!             artif++;
  1033. X!             m++;
  1034. X!             }
  1035. X          }
  1036. X  
  1037. X!         if(artif->otyp) {
  1038. X!             *otmp1 = oname(otmp, artif->name, 0);
  1039. X!             artiexist[m] = TRUE;
  1040. X!         }
  1041. X      }
  1042. X  }
  1043. X  
  1044. X! #endif /* OVLB */
  1045. X! #ifdef OVL0
  1046. X! 
  1047. X! XSTATIC const struct artifact *
  1048. X  get_artifact(otmp)
  1049. X  struct obj *otmp;
  1050. X  {
  1051. X***************
  1052. X*** 130,139 ****
  1053. X          for(artif = artilist; artif->otyp; artif++)
  1054. X              if(artif->otyp == otmp->otyp &&
  1055. X                 !strcmp(ONAME(otmp), artif->name))
  1056. X!                 return((struct artifact *)artif);
  1057. X      return((struct artifact *)0);
  1058. X  }
  1059. X  
  1060. X  boolean
  1061. X  is_artifact(otmp)
  1062. X  struct obj *otmp;
  1063. X--- 169,181 ----
  1064. X          for(artif = artilist; artif->otyp; artif++)
  1065. X              if(artif->otyp == otmp->otyp &&
  1066. X                 !strcmp(ONAME(otmp), artif->name))
  1067. X!                 return artif;
  1068. X      return((struct artifact *)0);
  1069. X  }
  1070. X  
  1071. X+ #endif /* OVL0 */
  1072. X+ #ifdef OVLB
  1073. X+ 
  1074. X  boolean
  1075. X  is_artifact(otmp)
  1076. X  struct obj *otmp;
  1077. X***************
  1078. X*** 142,156 ****
  1079. X  }
  1080. X  
  1081. X  boolean
  1082. X  spec_ability(otmp, abil)
  1083. X  struct obj *otmp;
  1084. X  unsigned abil;
  1085. X  {
  1086. X!     struct artifact *arti = get_artifact(otmp);
  1087. X      
  1088. X      return(arti && (arti->spfx & abil));
  1089. X  }
  1090. X  
  1091. X  int
  1092. X  restr_name(otmp, name)    /* returns 1 if name is restricted for otmp->otyp */
  1093. X  register struct obj *otmp;
  1094. X--- 184,238 ----
  1095. X  }
  1096. X  
  1097. X  boolean
  1098. X+ exist_artifact(otmp, name)
  1099. X+ register struct obj *otmp;
  1100. X+ register const char *name;
  1101. X+ {
  1102. X+     register const struct artifact *artif;
  1103. X+     register boolean *arex;
  1104. X+ 
  1105. X+     if(otmp && strlen(name))
  1106. X+         for(artif = artilist,arex = artiexist; artif->otyp; artif++,arex++)
  1107. X+         if(artif->otyp == otmp->otyp &&
  1108. X+            !strcmp(name, artif->name) &&
  1109. X+            *arex)
  1110. X+             return TRUE;
  1111. X+     return FALSE;
  1112. X+ }
  1113. X+ 
  1114. X+ void
  1115. X+ artifact_exists(otmp, name, mod)
  1116. X+ register struct obj *otmp;
  1117. X+ register const char *name;
  1118. X+ register boolean mod;
  1119. X+ {
  1120. X+     register const struct artifact *artif;
  1121. X+     register boolean *arex;
  1122. X+ 
  1123. X+     if(otmp && strlen(name))
  1124. X+         for(artif = artilist,arex = artiexist; artif->otyp; artif++,arex++)
  1125. X+         if(artif->otyp == otmp->otyp &&
  1126. X+            !strcmp(name, artif->name))
  1127. X+             *arex = mod;
  1128. X+     return;
  1129. X+ }
  1130. X+ 
  1131. X+ #endif /* OVLB */
  1132. X+ #ifdef OVL0
  1133. X+ 
  1134. X+ boolean
  1135. X  spec_ability(otmp, abil)
  1136. X  struct obj *otmp;
  1137. X  unsigned abil;
  1138. X  {
  1139. X!     const struct artifact *arti = get_artifact(otmp);
  1140. X      
  1141. X      return(arti && (arti->spfx & abil));
  1142. X  }
  1143. X  
  1144. X+ #endif /* OVL0 */
  1145. X+ #ifdef OVLB
  1146. X+ 
  1147. X  int
  1148. X  restr_name(otmp, name)    /* returns 1 if name is restricted for otmp->otyp */
  1149. X  register struct obj *otmp;
  1150. X***************
  1151. X*** 175,198 ****
  1152. X  {
  1153. X      register const struct artifact *artif;
  1154. X      register struct obj *otmp;
  1155. X!     register int n = 0;
  1156. X  
  1157. X!     for(artif = artilist; artif->otyp; artif++)
  1158. X!         if(align == artif->align && !(artif->spfx & SPFX_NOGEN))
  1159. X          if (pl_character[0] == artif->class) {
  1160. X!             n=0; break;
  1161. X          } else n++;
  1162. X      if (n) {
  1163. X          n = rnd(n);
  1164. X!         for(artif = artilist; artif->otyp && n > 0; ) {
  1165. X!             if(align == artif->align && !(artif->spfx & SPFX_NOGEN))
  1166. X              n--;
  1167. X!             if (n > 0) artif++;
  1168. X          }
  1169. X      }
  1170. X      if(artif->otyp) {
  1171. X          otmp = mksobj((int)artif->otyp, FALSE);
  1172. X          otmp = oname(otmp, artif->name, 0);
  1173. X          return (otmp);
  1174. X      }
  1175. X      return ((struct obj *) 0);
  1176. X--- 257,285 ----
  1177. X  {
  1178. X      register const struct artifact *artif;
  1179. X      register struct obj *otmp;
  1180. X!     register int n = 0, m;
  1181. X  
  1182. X!     for(artif = artilist,m = 0; artif->otyp; artif++,m++)
  1183. X!         if(align == artif->align && !(artif->spfx & SPFX_NOGEN) && !artiexist[m])
  1184. X          if (pl_character[0] == artif->class) {
  1185. X!             n = 0;
  1186. X!             break;
  1187. X          } else n++;
  1188. X      if (n) {
  1189. X          n = rnd(n);
  1190. X!         for(artif = artilist,m = 0; artif->otyp && n > 0; ) {
  1191. X!             if(align == artif->align && !(artif->spfx & SPFX_NOGEN) && !artiexist[m])
  1192. X              n--;
  1193. X!             if (n > 0) {
  1194. X!             artif++;
  1195. X!             m++;
  1196. X!             }
  1197. X          }
  1198. X      }
  1199. X      if(artif->otyp) {
  1200. X          otmp = mksobj((int)artif->otyp, FALSE);
  1201. X          otmp = oname(otmp, artif->name, 0);
  1202. X+         artiexist[m] = TRUE;
  1203. X          return (otmp);
  1204. X      }
  1205. X      return ((struct obj *) 0);
  1206. X***************
  1207. X*** 204,210 ****
  1208. X  register int adtyp;
  1209. X  register struct obj *otmp;
  1210. X  {
  1211. X!     register struct artifact *weap;
  1212. X  
  1213. X      if(weap = get_artifact(otmp))
  1214. X          return(weap->defn.adtyp == adtyp);
  1215. X--- 291,297 ----
  1216. X  register int adtyp;
  1217. X  register struct obj *otmp;
  1218. X  {
  1219. X!     register const struct artifact *weap;
  1220. X  
  1221. X      if(weap = get_artifact(otmp))
  1222. X          return(weap->defn.adtyp == adtyp);
  1223. X***************
  1224. X*** 211,223 ****
  1225. X      return(0);
  1226. X  }
  1227. X  
  1228. X! static int
  1229. X  spec_applies(weap, ptr)
  1230. X! register struct artifact *weap;
  1231. X  struct permonst *ptr;
  1232. X  {
  1233. X      if(!(weap->spfx & (SPFX_DBONUS | SPFX_ATTK)))
  1234. X!         return(1);
  1235. X  
  1236. X      if(weap->spfx & SPFX_DMONS)
  1237. X          return((ptr == &mons[(int)weap->mtype]));
  1238. X--- 298,310 ----
  1239. X      return(0);
  1240. X  }
  1241. X  
  1242. X! XSTATIC int
  1243. X  spec_applies(weap, ptr)
  1244. X! register const struct artifact *weap;
  1245. X  struct permonst *ptr;
  1246. X  {
  1247. X      if(!(weap->spfx & (SPFX_DBONUS | SPFX_ATTK)))
  1248. X!         return(0);
  1249. X  
  1250. X      if(weap->spfx & SPFX_DMONS)
  1251. X          return((ptr == &mons[(int)weap->mtype]));
  1252. X***************
  1253. X*** 241,252 ****
  1254. X      return(0);
  1255. X  }
  1256. X  
  1257. X  int
  1258. X  spec_abon(otmp, ptr)
  1259. X  struct obj *otmp;
  1260. X  struct permonst *ptr;
  1261. X  {
  1262. X!     register struct artifact *weap;
  1263. X  
  1264. X      if((weap = get_artifact(otmp)))
  1265. X          if(spec_applies(weap, ptr))
  1266. X--- 328,342 ----
  1267. X      return(0);
  1268. X  }
  1269. X  
  1270. X+ #endif /* OVLB */
  1271. X+ #ifdef OVL1
  1272. X+ 
  1273. X  int
  1274. X  spec_abon(otmp, ptr)
  1275. X  struct obj *otmp;
  1276. X  struct permonst *ptr;
  1277. X  {
  1278. X!     register const struct artifact *weap;
  1279. X  
  1280. X      if((weap = get_artifact(otmp)))
  1281. X          if(spec_applies(weap, ptr))
  1282. X***************
  1283. X*** 260,266 ****
  1284. X  register struct permonst *ptr;
  1285. X  register int    tmp;
  1286. X  {
  1287. X!     register struct artifact *weap;
  1288. X  
  1289. X      if((weap = get_artifact(otmp)))
  1290. X          if(spec_applies(weap, ptr))
  1291. X--- 350,356 ----
  1292. X  register struct permonst *ptr;
  1293. X  register int    tmp;
  1294. X  {
  1295. X!     register const struct artifact *weap;
  1296. X  
  1297. X      if((weap = get_artifact(otmp)))
  1298. X          if(spec_applies(weap, ptr))
  1299. X***************
  1300. X*** 267,270 ****
  1301. X--- 357,363 ----
  1302. X              return((weap->attk.damd) ? rnd((int)weap->attk.damd) : tmp);
  1303. X      return(0);
  1304. X  }
  1305. X+ 
  1306. X+ #endif /* OVL1 */
  1307. X+ 
  1308. X  #endif /* NAMED_ITEMS */
  1309. X*** src/Old/attrib.c    Mon Feb 19 17:54:19 1990
  1310. X--- src/attrib.c    Sat Feb 17 20:29:27 1990
  1311. X***************
  1312. X*** 1,11 ****
  1313. X! /*
  1314. X!  *    attrib.c    - attribute modification routines.
  1315. X!  *
  1316. X!  *    Copyright 1988, M. Stephenson
  1317. X!  */
  1318. X  /* NetHack may be freely redistributed.  See license for details. */
  1319. X  
  1320. X! #include    "hack.h"
  1321. X  
  1322. X  const char    *plusattr[] = {    /* part of the output on gain of attribute */
  1323. X  
  1324. X--- 1,12 ----
  1325. X! /*    SCCS Id: @(#)attrib.c    3.0    90/2/15
  1326. X! /*    Copyright 1988, 1989, 1990, M. Stephenson          */
  1327. X  /* NetHack may be freely redistributed.  See license for details. */
  1328. X  
  1329. X! /*  attribute modification routines. */
  1330. X! 
  1331. X! #include "hack.h"
  1332. X! 
  1333. X! #ifdef OVLB
  1334. X  
  1335. X  const char    *plusattr[] = {    /* part of the output on gain of attribute */
  1336. X  
  1337. X***************
  1338. X*** 30,42 ****
  1339. X  
  1340. X      schar    ulevel;
  1341. X      long    *ability;
  1342. X!     char    *gainstr, *losestr;
  1343. X! }    a_abil[] = { {     0, &(Stealth), "", "" },
  1344. X!              {   0, &(Fast), "", "" },
  1345. X               {  10, &(Searching), "perceptive", "" },
  1346. X               {     0, 0, 0, 0 } },
  1347. X  
  1348. X!     b_abil[] = { {     0, &(HPoison_resistance), "", "" },
  1349. X               {   7, &(Fast), "quick", "slow" },
  1350. X               {  15, &(Stealth), "stealthy", "" },
  1351. X               {     0, 0, 0, 0 } },
  1352. X--- 31,43 ----
  1353. X  
  1354. X      schar    ulevel;
  1355. X      long    *ability;
  1356. X!     const char *gainstr, *losestr;
  1357. X! }    a_abil[] = { {     1, &(Stealth), "", "" },
  1358. X!              {   1, &(Fast), "", "" },
  1359. X               {  10, &(Searching), "perceptive", "" },
  1360. X               {     0, 0, 0, 0 } },
  1361. X  
  1362. X!     b_abil[] = { {     1, &(HPoison_resistance), "", "" },
  1363. X               {   7, &(Fast), "quick", "slow" },
  1364. X               {  15, &(Stealth), "stealthy", "" },
  1365. X               {     0, 0, 0, 0 } },
  1366. X***************
  1367. X*** 45,57 ****
  1368. X               {    15, &(Warning), "sensitive", "" },
  1369. X               {     0, 0, 0, 0 } },
  1370. X  
  1371. X!     e_abil[] = { {   0, &(Fast), "", "" },
  1372. X!              {     0, &(HSee_invisible), "", "" },
  1373. X!              {     0, &(Searching), "", "" },
  1374. X!              {     0, &(HSleep_resistance), "", "" },
  1375. X               {     0, 0, 0, 0 } },
  1376. X  
  1377. X!     h_abil[] = { {     0, &(HPoison_resistance), "", "" },
  1378. X               {    15, &(Warning), "sensitive", "" },
  1379. X               {     0, 0, 0, 0 } },
  1380. X  
  1381. X--- 46,58 ----
  1382. X               {    15, &(Warning), "sensitive", "" },
  1383. X               {     0, 0, 0, 0 } },
  1384. X  
  1385. X!     e_abil[] = { {   1, &(Fast), "", "" },
  1386. X!              {     1, &(HSee_invisible), "", "" },
  1387. X!              {     1, &(Searching), "", "" },
  1388. X!              {     1, &(HSleep_resistance), "", "" },
  1389. X               {     0, 0, 0, 0 } },
  1390. X  
  1391. X!     h_abil[] = { {     1, &(HPoison_resistance), "", "" },
  1392. X               {    15, &(Warning), "sensitive", "" },
  1393. X               {     0, 0, 0, 0 } },
  1394. X  
  1395. X***************
  1396. X*** 62,72 ****
  1397. X               {  20, &(HFire_resistance), "cool", "warmer" },
  1398. X               {     0, 0, 0, 0 } },
  1399. X  
  1400. X!     r_abil[] = { {     0, &(Stealth), "", ""  },
  1401. X               {  10, &(Searching), "perceptive", "" },
  1402. X               {     0, 0, 0, 0 } },
  1403. X  
  1404. X!     s_abil[] = { {     0, &(Fast), "", "" },
  1405. X               {  15, &(Stealth), "stealthy", "" },
  1406. X               {     0, 0, 0, 0 } },
  1407. X  
  1408. X--- 63,73 ----
  1409. X               {  20, &(HFire_resistance), "cool", "warmer" },
  1410. X               {     0, 0, 0, 0 } },
  1411. X  
  1412. X!     r_abil[] = { {     1, &(Stealth), "", ""  },
  1413. X               {  10, &(Searching), "perceptive", "" },
  1414. X               {     0, 0, 0, 0 } },
  1415. X  
  1416. X!     s_abil[] = { {     1, &(Fast), "", "" },
  1417. X               {  15, &(Stealth), "stealthy", "" },
  1418. X               {     0, 0, 0, 0 } },
  1419. X  
  1420. X***************
  1421. X*** 74,81 ****
  1422. X               {    20, &(HPoison_resistance), "hardy", "" },
  1423. X               {     0, 0, 0, 0 } },
  1424. X  
  1425. X!     v_abil[] = { {     0, &(HCold_resistance), "", "" },
  1426. X!              {     0, &(Stealth), "", "" },
  1427. X               {   7, &(Fast), "quick", "slow" },
  1428. X               {     0, 0, 0, 0 } },
  1429. X  
  1430. X--- 75,82 ----
  1431. X               {    20, &(HPoison_resistance), "hardy", "" },
  1432. X               {     0, 0, 0, 0 } },
  1433. X  
  1434. X!     v_abil[] = { {     1, &(HCold_resistance), "", "" },
  1435. X!              {     1, &(Stealth), "", "" },
  1436. X               {   7, &(Fast), "quick", "slow" },
  1437. X               {     0, 0, 0, 0 } },
  1438. X  
  1439. X***************
  1440. X*** 151,156 ****
  1441. X--- 152,160 ----
  1442. X             {    20, 15, 15, 15, 20, 15 },
  1443. X               0,  0, 12, 10, 14,  1,  0 };
  1444. X  
  1445. X+ static const struct clattr *NDECL(clx);
  1446. X+ static void NDECL(init_align);
  1447. X+ 
  1448. X  void
  1449. X  adjattrib(ndx, incr, silent)
  1450. X  
  1451. X***************
  1452. X*** 259,264 ****
  1453. X--- 263,271 ----
  1454. X      return sgn(bonchance);
  1455. X  }
  1456. X  
  1457. X+ #endif /* OVLB */
  1458. X+ #ifdef OVL1
  1459. X+ 
  1460. X  void
  1461. X  restore_attrib() {
  1462. X  
  1463. X***************
  1464. X*** 277,282 ****
  1465. X--- 284,292 ----
  1466. X      }
  1467. X  }
  1468. X  
  1469. X+ #endif /* OVL1 */
  1470. X+ #ifdef OVLB
  1471. X+ 
  1472. X  static const struct    clattr *
  1473. X  clx()  {
  1474. X  
  1475. X***************
  1476. X*** 394,418 ****
  1477. X  }
  1478. X  
  1479. X  void
  1480. X! adjabil(flag)
  1481. X! 
  1482. X!     int    flag;        /* +ve/-ve  = gain/lose */
  1483. X  {
  1484. X      register const struct clattr    *attr = clx();
  1485. X      register const struct innate    *abil = attr->abil;
  1486. X  
  1487. X      if(abil) {
  1488. X- 
  1489. X          for(; abil->ability; abil++) {
  1490. X!         if ((flag>0 && u.ulevel >= abil->ulevel) ||
  1491. X!                     (flag<0 && u.ulevel < abil->ulevel)) {
  1492. X!             if(flag > 0) {
  1493. X              if(!(*(abil->ability) & INTRINSIC)) {
  1494. X                  *(abil->ability) |= INTRINSIC;
  1495. X                  if(strlen(abil->gainstr))
  1496. X                  You("feel %s!", abil->gainstr);
  1497. X              }
  1498. X!             } else {
  1499. X              if((*(abil->ability) & INTRINSIC)) {
  1500. X                  *(abil->ability) &= ~INTRINSIC;
  1501. X                  if(strlen(abil->losestr))
  1502. X--- 404,430 ----
  1503. X  }
  1504. X  
  1505. X  void
  1506. X! adjabil(oldlevel,newlevel)
  1507. X! int oldlevel, newlevel;
  1508. X  {
  1509. X      register const struct clattr    *attr = clx();
  1510. X+ #ifdef __GNULINT__
  1511. X+     /* this is the "right" definition */
  1512. X      register const struct innate    *abil = attr->abil;
  1513. X+ #else
  1514. X+     /* this one satisfies more compilers */
  1515. X+     register struct innate    *abil = (struct innate *)attr->abil;
  1516. X+ #endif
  1517. X  
  1518. X      if(abil) {
  1519. X          for(; abil->ability; abil++) {
  1520. X!         if(oldlevel < abil->ulevel && newlevel >= abil->ulevel) {
  1521. X              if(!(*(abil->ability) & INTRINSIC)) {
  1522. X                  *(abil->ability) |= INTRINSIC;
  1523. X                  if(strlen(abil->gainstr))
  1524. X                  You("feel %s!", abil->gainstr);
  1525. X              }
  1526. X!         } else if (oldlevel >= abil->ulevel && newlevel < abil->ulevel) {
  1527. X              if((*(abil->ability) & INTRINSIC)) {
  1528. X                  *(abil->ability) &= ~INTRINSIC;
  1529. X                  if(strlen(abil->losestr))
  1530. X***************
  1531. X*** 420,427 ****
  1532. X                  else if(strlen(abil->gainstr))
  1533. X                  You("feel less %s!", abil->gainstr);
  1534. X              }
  1535. X!             }
  1536. X!         } 
  1537. X          }
  1538. X      }
  1539. X  }
  1540. X--- 432,438 ----
  1541. X                  else if(strlen(abil->gainstr))
  1542. X                  You("feel less %s!", abil->gainstr);
  1543. X              }
  1544. X!         }
  1545. X          }
  1546. X      }
  1547. X  }
  1548. X***************
  1549. X*** 459,466 ****
  1550. X      return((hp <= 0) ? 1 : hp);
  1551. X  }
  1552. X  
  1553. X  schar
  1554. X! acurr(x) { 
  1555. X      register int tmp = (u.abon.a[x] + u.atemp.a[x] + u.acurr.a[x]);
  1556. X  
  1557. X      if (x == A_STR) {
  1558. X--- 470,482 ----
  1559. X      return((hp <= 0) ? 1 : hp);
  1560. X  }
  1561. X  
  1562. X+ #endif /* OVLB */
  1563. X+ #ifdef OVL0
  1564. X+ 
  1565. X  schar
  1566. X! acurr(x)
  1567. X! int x;
  1568. X! { 
  1569. X      register int tmp = (u.abon.a[x] + u.atemp.a[x] + u.acurr.a[x]);
  1570. X  
  1571. X      if (x == A_STR) {
  1572. X***************
  1573. X*** 470,475 ****
  1574. X--- 486,494 ----
  1575. X      else return((tmp >= 25) ? 25 : (tmp <= 3) ? 3 : tmp);
  1576. X  }
  1577. X  
  1578. X+ #endif /* OVL0 */
  1579. X+ #ifdef OVL2
  1580. X+ 
  1581. X  /* avoid possible problems with alignment overflow, and provide a centralized
  1582. X   * location for any future alignment limits
  1583. X   */
  1584. X***************
  1585. X*** 486,488 ****
  1586. X--- 505,509 ----
  1587. X          if(newalign > u.ualign)
  1588. X              u.ualign = newalign;
  1589. X  }
  1590. X+ 
  1591. X+ #endif /* OVL2 */
  1592. X*** src/Old/bones.c    Mon Feb 19 17:54:43 1990
  1593. X--- src/bones.c    Sun Feb 18 14:15:22 1990
  1594. X***************
  1595. X*** 4,20 ****
  1596. X  
  1597. X  #include "hack.h"
  1598. X  
  1599. X- #ifdef OLD_TOS
  1600. X- #define OMASK    0x8000
  1601. X- #else
  1602. X  #define OMASK    0
  1603. X- #endif
  1604. X  
  1605. X  #ifdef DGK
  1606. X  char bones[FILENAME];
  1607. X- #ifndef OLD_TOS
  1608. X  extern long bytes_counted;
  1609. X- #endif
  1610. X  #else
  1611. X  char bones[] = "bones.xxxx";
  1612. X  #endif
  1613. X--- 4,14 ----
  1614. X***************
  1615. X*** 22,27 ****
  1616. X--- 16,30 ----
  1617. X  #ifdef COMPRESS
  1618. X  static char cmd[60], proxy[20];
  1619. X  
  1620. X+ static void NDECL(compress_bones);
  1621. X+ #endif
  1622. X+ static boolean FDECL(no_bones_level, (int));
  1623. X+ void FDECL(resetobjs,(struct obj *));
  1624. X+ #ifdef TUTTI_FRUTTI
  1625. X+ static void FDECL(goodfruit, (int));
  1626. X+ #endif
  1627. X+ 
  1628. X+ #ifdef COMPRESS
  1629. X  static void
  1630. X  compress_bones()
  1631. X  {
  1632. X***************
  1633. X*** 40,45 ****
  1634. X--- 43,52 ----
  1635. X  no_bones_level(lev)
  1636. X  int lev;
  1637. X  {
  1638. X+     extern int save_dlevel;        /* in do.c */
  1639. X+ 
  1640. X+     if (save_dlevel) lev = save_dlevel;
  1641. X+ 
  1642. X      return (lev == medusa_level ||
  1643. X          lev == wiz_level
  1644. X  #ifdef REINCARNATION
  1645. X***************
  1646. X*** 80,91 ****
  1647. X      for (otmp = ochain; otmp; otmp = otmp->nobj) {
  1648. X          otmp->o_id = 0;
  1649. X          if (((otmp->otyp != CORPSE && otmp->otyp != STATUE)
  1650. X!                    || otmp->corpsenm < PM_ARCHEOLOGIST)
  1651. X  #ifdef NAMED_ITEMS
  1652. X!             && !is_artifact(otmp)
  1653. X  #endif
  1654. X          )
  1655. X!         otmp->onamelth = 0;
  1656. X          if(objects[otmp->otyp].oc_uses_known) otmp->known = 0;
  1657. X  #ifdef TUTTI_FRUTTI
  1658. X          if(otmp->otyp == SLIME_MOLD) goodfruit(otmp->spe);
  1659. X--- 87,102 ----
  1660. X      for (otmp = ochain; otmp; otmp = otmp->nobj) {
  1661. X          otmp->o_id = 0;
  1662. X          if (((otmp->otyp != CORPSE && otmp->otyp != STATUE)
  1663. X!             || otmp->corpsenm < PM_ARCHEOLOGIST)
  1664. X  #ifdef NAMED_ITEMS
  1665. X!             && !(is_artifact(otmp) && !exist_artifact(otmp,ONAME(otmp)))
  1666. X  #endif
  1667. X          )
  1668. X!             otmp->onamelth = 0;
  1669. X! #ifdef NAMED_ITEMS
  1670. X!         else if (is_artifact(otmp))
  1671. X!             artifact_exists(otmp,ONAME(otmp),TRUE);
  1672. X! #endif
  1673. X          if(objects[otmp->otyp].oc_uses_known) otmp->known = 0;
  1674. X  #ifdef TUTTI_FRUTTI
  1675. X          if(otmp->otyp == SLIME_MOLD) goodfruit(otmp->spe);
  1676. X***************
  1677. X*** 194,206 ****
  1678. X          if (!mtmp) return;
  1679. X          Strcpy((char *) mtmp->mextra, plname);
  1680. X      } else {
  1681. X-         mons[u.ugrave_arise].pxlth += strlen(plname);
  1682. X          mtmp = makemon(&mons[u.ugrave_arise], u.ux, u.uy);
  1683. X-         mons[u.ugrave_arise].pxlth -= strlen(plname);
  1684. X          in_mklev = FALSE;
  1685. X          if (!mtmp) return;
  1686. X!         Strcpy(NAME(mtmp), plname);
  1687. X!         mtmp->mnamelth = strlen(plname);
  1688. X          atl(u.ux, u.uy, mtmp->data->mlet);
  1689. X          Your("body rises from the dead as %s...",
  1690. X              an(mons[u.ugrave_arise].mname));
  1691. X--- 205,214 ----
  1692. X          if (!mtmp) return;
  1693. X          Strcpy((char *) mtmp->mextra, plname);
  1694. X      } else {
  1695. X          mtmp = makemon(&mons[u.ugrave_arise], u.ux, u.uy);
  1696. X          in_mklev = FALSE;
  1697. X          if (!mtmp) return;
  1698. X!         mtmp = christen_monst(mtmp, plname);
  1699. X          atl(u.ux, u.uy, mtmp->data->mlet);
  1700. X          Your("body rises from the dead as %s...",
  1701. X              an(mons[u.ugrave_arise].mname));
  1702. X***************
  1703. X*** 260,279 ****
  1704. X          return;
  1705. X      }
  1706. X  
  1707. X! #if defined(DGK) && !defined(OLD_TOS)    /* check whether there is room */
  1708. X      count_only = TRUE;
  1709. X! #ifdef TUTTI_FRUTTI
  1710. X      savefruitchn(fd);
  1711. X! #endif
  1712. X      savelev(fd, dlevel, COUNT);
  1713. X! #ifdef ZEROCOMP
  1714. X      bflush(fd);
  1715. X! #endif
  1716. X      if (bytes_counted > freediskspace(bones)) {    /* not enough room */
  1717. X! #ifdef WIZARD
  1718. X          if (wizard)
  1719. X              pline("Insufficient space to create bones file.");
  1720. X! #endif
  1721. X          unlink(bones);
  1722. X          return;
  1723. X      }
  1724. X--- 268,287 ----
  1725. X          return;
  1726. X      }
  1727. X  
  1728. X! #if defined(DGK)    /* check whether there is room */
  1729. X      count_only = TRUE;
  1730. X! # ifdef TUTTI_FRUTTI
  1731. X      savefruitchn(fd);
  1732. X! # endif
  1733. X      savelev(fd, dlevel, COUNT);
  1734. X! # ifdef ZEROCOMP
  1735. X      bflush(fd);
  1736. X! # endif
  1737. X      if (bytes_counted > freediskspace(bones)) {    /* not enough room */
  1738. X! # ifdef WIZARD
  1739. X          if (wizard)
  1740. X              pline("Insufficient space to create bones file.");
  1741. X! # endif
  1742. X          unlink(bones);
  1743. X          return;
  1744. X      }
  1745. X***************
  1746. X*** 283,289 ****
  1747. X  #ifdef TUTTI_FRUTTI
  1748. X      savefruitchn(fd);
  1749. X  #endif
  1750. X! #if defined(DGK) && !defined(OLD_TOS)
  1751. X      savelev(fd, dlevel, WRITE);
  1752. X  #else
  1753. X      savelev(fd,dlevel);
  1754. X--- 291,297 ----
  1755. X  #ifdef TUTTI_FRUTTI
  1756. X      savefruitchn(fd);
  1757. X  #endif
  1758. X! #if defined(DGK)
  1759. X      savelev(fd, dlevel, WRITE);
  1760. X  #else
  1761. X      savelev(fd,dlevel);
  1762. X***************
  1763. X*** 354,359 ****
  1764. X--- 362,378 ----
  1765. X          getlev(fd, 0, dlevel, TRUE);
  1766. X      }
  1767. X      (void) close(fd);
  1768. X+ #ifdef NAMED_ITEMS
  1769. X+     /* to correctly reset named artifacts on the level */
  1770. X+     {
  1771. X+         register struct monst *mtmp;
  1772. X+ 
  1773. X+         for(mtmp = fmon; mtmp; mtmp = mtmp->nmon)
  1774. X+             resetobjs(mtmp->minvent);
  1775. X+         resetobjs(fobj);
  1776. X+         resetobjs(fcobj);
  1777. X+     }
  1778. X+ #endif
  1779. X  #ifdef WIZARD
  1780. X      if(wizard) {
  1781. X          pline("Unlink bones? ");
  1782. X*** src/Old/lev_comp.l    Mon Feb 19 18:08:37 1990
  1783. X--- src/lev_comp.l    Fri Feb  2 18:24:03 1990
  1784. X***************
  1785. X*** 1,5 ****
  1786. X  %{
  1787. X! /*    SCCS Id: @(#)lev_lex.c    3.0    89/11/08
  1788. X  /*    Copyright (c) 1989 by Jean-Christophe Collet */
  1789. X  /* NetHack may be freely redistributed.  See license for details. */
  1790. X  
  1791. X--- 1,5 ----
  1792. X  %{
  1793. X! /*    SCCS Id: @(#)lev_lex.c    3.0    90/01/04
  1794. X  /*    Copyright (c) 1989 by Jean-Christophe Collet */
  1795. X  /* NetHack may be freely redistributed.  See license for details. */
  1796. X  
  1797. X***************
  1798. X*** 6,29 ****
  1799. X  #define LEV_LEX_C
  1800. X  
  1801. X  /* block some unused #defines to avoid overloading some cpp's */
  1802. X! #define MONDATA_H
  1803. X! #define MONFLAG_H
  1804. X  
  1805. X  #include "hack.h"
  1806. X  #include "lev_comp.h"
  1807. X  #include "sp_lev.h"
  1808. X  
  1809. X  #ifdef MSDOS
  1810. X  #undef exit
  1811. X  #endif
  1812. X  
  1813. X! #ifdef TOS
  1814. X! extern YYSTYPE yylval;    /* this doesn't always get put in lev_comp.h */
  1815. X! #endif
  1816. X  
  1817. X  #ifdef MACOS
  1818. X  #undef putchar
  1819. X  #undef putc
  1820. X  #endif
  1821. X  int line_number = 1;
  1822. X  
  1823. X--- 6,51 ----
  1824. X  #define LEV_LEX_C
  1825. X  
  1826. X  /* block some unused #defines to avoid overloading some cpp's */
  1827. X! #define MONDATA_H    /* comment this line for pre-compiled headers */
  1828. X! #define MONFLAG_H    /* comment this line for pre-compiled headers */
  1829. X  
  1830. X  #include "hack.h"
  1831. X  #include "lev_comp.h"
  1832. X  #include "sp_lev.h"
  1833. X  
  1834. X+ /* Most of these don't exist in flex, yywrap is macro and
  1835. X+  * yyunput is properly declared in flex.skel.
  1836. X+  */
  1837. X+ #ifndef FLEX_SCANNER
  1838. X+ int FDECL (yyback, (int *, int));
  1839. X+ int NDECL (yylook);
  1840. X+ int NDECL (yyinput);
  1841. X+ int NDECL (yywrap);
  1842. X+ int NDECL (yylex);
  1843. X+ int FDECL (yyunput, (int));
  1844. X+ int FDECL (yyoutput, (int));
  1845. X+ #endif
  1846. X+ 
  1847. X  #ifdef MSDOS
  1848. X  #undef exit
  1849. X  #endif
  1850. X  
  1851. X! /* this doesn't always get put in lev_comp.h
  1852. X!  * (esp. when using older versions of bison)
  1853. X!  */
  1854. X! 
  1855. X! extern YYSTYPE yylval;
  1856. X  
  1857. X  #ifdef MACOS
  1858. X  #undef putchar
  1859. X  #undef putc
  1860. X+ #undef printf
  1861. X+ #undef Printf
  1862. X+ #define Printf printf
  1863. X+ # ifdef LSC
  1864. X+ #define    putc(c,stream)    (fputc(c,stream))
  1865. X+ #define    putchar(c)    (fputc(c,stdout))
  1866. X+ # endif
  1867. X  #endif
  1868. X  int line_number = 1;
  1869. X  
  1870. X***************
  1871. X*** 102,104 ****
  1872. X--- 124,133 ----
  1873. X  '.'        { yylval.i = yytext[1]; return CHAR; }
  1874. X  .        { return yytext[0]; }
  1875. X  %%
  1876. X+ #ifdef    AMIGA
  1877. X+ long *alloc(n)
  1878. X+     unsigned n;
  1879. X+ {
  1880. X+     return ((long *)malloc (n));
  1881. X+ }
  1882. X+ #endif
  1883. X*** src/Old/lev_comp.y    Mon Feb 19 18:08:53 1990
  1884. X--- src/lev_comp.y    Wed Feb 14 20:49:06 1990
  1885. X***************
  1886. X*** 1,5 ****
  1887. X  %{ 
  1888. X! /*    SCCS Id: @(#)lev_comp.c    3.0    89/07/02
  1889. X  /*    Copyright (c) 1989 by Jean-Christophe Collet */
  1890. X  /* NetHack may be freely redistributed.  See license for details. */
  1891. X  
  1892. X--- 1,5 ----
  1893. X  %{ 
  1894. X! /*    SCCS Id: @(#)lev_comp.c    3.0    90/01/03
  1895. X  /*    Copyright (c) 1989 by Jean-Christophe Collet */
  1896. X  /* NetHack may be freely redistributed.  See license for details. */
  1897. X  
  1898. X***************
  1899. X*** 9,16 ****
  1900. X   */
  1901. X  
  1902. X  /* block some unused #defines to avoid overloading some cpp's */
  1903. X! #define MONDATA_H
  1904. X! #define MONFLAG_H
  1905. X  
  1906. X  #include "hack.h"
  1907. X  #include "sp_lev.h"
  1908. X--- 9,16 ----
  1909. X   */
  1910. X  
  1911. X  /* block some unused #defines to avoid overloading some cpp's */
  1912. X! #define MONDATA_H    /* comment line for pre-compiled headers */
  1913. X! #define MONFLAG_H    /* comment line for pre-compiled headers */
  1914. X  
  1915. X  #include "hack.h"
  1916. X  #include "sp_lev.h"
  1917. X***************
  1918. X*** 21,35 ****
  1919. X  # include <sys/file.h>
  1920. X  #endif
  1921. X  
  1922. X  #ifdef AMIGA
  1923. X  char *fgets();
  1924. X- # define    alloc   malloc
  1925. X  # undef     fopen
  1926. X  # undef     printf
  1927. X  # undef     Printf
  1928. X  # define    Printf  printf
  1929. X  # define    memset(addr,val,len)    setmem(addr,len,val)
  1930. X  #endif
  1931. X  
  1932. X  #ifdef MSDOS
  1933. X  # undef exit
  1934. X--- 21,51 ----
  1935. X  # include <sys/file.h>
  1936. X  #endif
  1937. X  
  1938. X+ void FDECL(yyerror, (char *));
  1939. X+ void FDECL(yywarning, (char *));
  1940. X+ int NDECL(yylex);
  1941. X+ int NDECL(yyparse);
  1942. X+ 
  1943. X+ int FDECL(get_room_type, (char *));
  1944. X+ int FDECL(get_trap_type, (char *));
  1945. X+ int FDECL(get_monster_id, (char *, CHAR_P));
  1946. X+ int FDECL(get_object_id, (char *, CHAR_P));
  1947. X+ boolean FDECL(check_monster_char, (CHAR_P));
  1948. X+ boolean FDECL(check_object_char, (CHAR_P));
  1949. X+ void FDECL(scan_map, (char *));
  1950. X+ void NDECL(store_part);
  1951. X+ void FDECL(write_maze, (int, specialmaze *));
  1952. X+ 
  1953. X  #ifdef AMIGA
  1954. X  char *fgets();
  1955. X  # undef     fopen
  1956. X  # undef     printf
  1957. X  # undef     Printf
  1958. X  # define    Printf  printf
  1959. X+ #ifndef    LATTICE
  1960. X  # define    memset(addr,val,len)    setmem(addr,len,val)
  1961. X  #endif
  1962. X+ #endif
  1963. X  
  1964. X  #ifdef MSDOS
  1965. X  # undef exit
  1966. X***************
  1967. X*** 41,46 ****
  1968. X--- 57,64 ----
  1969. X  # define Printf printf
  1970. X  #endif
  1971. X  
  1972. X+ #undef NULL
  1973. X+ 
  1974. X  #define MAX_REGISTERS    10
  1975. X  #define ERR        (-1)
  1976. X  
  1977. X***************
  1978. X*** 145,153 ****
  1979. X  extern int fatal_error;
  1980. X  extern char* fname;
  1981. X  
  1982. X- boolean check_monster_char(), check_object_char();
  1983. X- void scan_map(), store_part(), write_maze();
  1984. X- 
  1985. X  %}
  1986. X  
  1987. X  %union
  1988. X--- 163,168 ----
  1989. X***************
  1990. X*** 167,172 ****
  1991. X--- 182,189 ----
  1992. X  %token    <i> ALIGNMENT LEFT_OR_RIGHT CENTER TOP_OR_BOT ALTAR_TYPE UP_OR_DOWN
  1993. X  %token    <i> ',' ':' '(' ')' '[' ']'
  1994. X  %token    <map> STRING MAP_ID
  1995. X+ %type    <i> h_justif v_justif trap_name room_type door_state light_state
  1996. X+ %type    <i> alignment altar_type a_register
  1997. X  %type    <map> string maze_def m_name o_name
  1998. X  %start    file
  1999. X  
  2000. X***************
  2001. X*** 175,181 ****
  2002. X          | levels ;
  2003. X  
  2004. X  levels        : level
  2005. X!         | levels level ;
  2006. X  
  2007. X  level        : maze_level ;
  2008. X  
  2009. X--- 192,198 ----
  2010. X          | levels ;
  2011. X  
  2012. X  levels        : level
  2013. X!         | level levels ;
  2014. X  
  2015. X  level        : maze_level ;
  2016. X  
  2017. X***************
  2018. X*** 186,191 ****
  2019. X--- 203,214 ----
  2020. X                if (fatal_error > 0)
  2021. X                    fprintf(stderr,"%s : %d errors detected. No output created!\n", fname, fatal_error);
  2022. X                else {
  2023. X+ #ifdef MACOS
  2024. X+                   OSErr    result;
  2025. X+                   
  2026. X+                   result = Create(CtoPstr($1), 0, CREATOR, AUXIL_TYPE);
  2027. X+                   (void)PtoCstr($1);
  2028. X+ #endif        
  2029. X                    fout = open($1, O_WRONLY | O_CREAT
  2030. X  #if defined(MSDOS) || defined(MACOS)
  2031. X                            | O_BINARY
  2032. X***************
  2033. X*** 211,217 ****
  2034. X            }
  2035. X  
  2036. X  regions     : aregion
  2037. X!         | regions aregion;
  2038. X  
  2039. X  aregion     : map_definition reg_init map_details
  2040. X            {
  2041. X--- 234,240 ----
  2042. X            }
  2043. X  
  2044. X  regions     : aregion
  2045. X!         | aregion regions ;
  2046. X  
  2047. X  aregion     : map_definition reg_init map_details
  2048. X            {
  2049. X***************
  2050. X*** 286,295 ****
  2051. X                else
  2052. X                    yyerror("Object list too long!");
  2053. X            }
  2054. X!         | object_list ',' object
  2055. X            {
  2056. X                if (n_olist < MAX_REGISTERS)
  2057. X!                   olist[n_olist++] = $<i>3;
  2058. X                else
  2059. X                    yyerror("Object list too long!");
  2060. X            }
  2061. X--- 309,318 ----
  2062. X                else
  2063. X                    yyerror("Object list too long!");
  2064. X            }
  2065. X!         | object ',' object_list
  2066. X            {
  2067. X                if (n_olist < MAX_REGISTERS)
  2068. X!                   olist[n_olist++] = $<i>1;
  2069. X                else
  2070. X                    yyerror("Object list too long!");
  2071. X            }
  2072. X***************
  2073. X*** 301,310 ****
  2074. X                else
  2075. X                    yyerror("Monster list too long!");
  2076. X            }
  2077. X!         | monster_list ',' monster
  2078. X            {
  2079. X                if (n_mlist < MAX_REGISTERS)
  2080. X!                   mlist[n_mlist++] = $<i>3;
  2081. X                else
  2082. X                    yyerror("Monster list too long!");
  2083. X            }
  2084. X--- 324,333 ----
  2085. X                else
  2086. X                    yyerror("Monster list too long!");
  2087. X            }
  2088. X!         | monster ',' monster_list
  2089. X            {
  2090. X                if (n_mlist < MAX_REGISTERS)
  2091. X!                   mlist[n_mlist++] = $<i>1;
  2092. X                else
  2093. X                    yyerror("Monster list too long!");
  2094. X            }
  2095. X***************
  2096. X*** 316,328 ****
  2097. X                else
  2098. X                    yyerror("Location list too long!");
  2099. X            }
  2100. X!         | place_list ',' place
  2101. X            {
  2102. X                if (n_plist < MAX_REGISTERS)
  2103. X                    plist[n_plist++] = current_coord;
  2104. X                else
  2105. X                    yyerror("Location list too long!");
  2106. X!           }
  2107. X  
  2108. X  map_details    : /* nothing */
  2109. X          | map_details map_detail ;
  2110. X--- 339,351 ----
  2111. X                else
  2112. X                    yyerror("Location list too long!");
  2113. X            }
  2114. X!         | place
  2115. X            {
  2116. X                if (n_plist < MAX_REGISTERS)
  2117. X                    plist[n_plist++] = current_coord;
  2118. X                else
  2119. X                    yyerror("Location list too long!");
  2120. X!           } ',' place_list
  2121. X  
  2122. X  map_details    : /* nothing */
  2123. X          | map_details map_detail ;
  2124. X***************
  2125. X*** 576,582 ****
  2126. X  
  2127. X  monster     : CHAR
  2128. X            {
  2129. X!             if (check_monster_char($1))
  2130. X                  $<i>$ = $1 ;
  2131. X              else {
  2132. X                  yyerror("unknown monster class!");
  2133. X--- 599,605 ----
  2134. X  
  2135. X  monster     : CHAR
  2136. X            {
  2137. X!             if (check_monster_char((char) $1))
  2138. X                  $<i>$ = $1 ;
  2139. X              else {
  2140. X                  yyerror("unknown monster class!");
  2141. X***************
  2142. X*** 641,647 ****
  2143. X      
  2144. X      for(i=0; i < SHOPBASE -1; i++)
  2145. X          if (!strcmp(s, room_types[i].name))
  2146. X!         return room_types[i].type;
  2147. X      return ERR;
  2148. X  }
  2149. X  
  2150. X--- 664,670 ----
  2151. X      
  2152. X      for(i=0; i < SHOPBASE -1; i++)
  2153. X          if (!strcmp(s, room_types[i].name))
  2154. X!         return ((int) room_types[i].type);
  2155. X      return ERR;
  2156. X  }
  2157. X  
  2158. X***************
  2159. X*** 657,663 ****
  2160. X      
  2161. X      for(i=0; i < TRAPNUM - 1; i++)
  2162. X          if(!strcmp(s,trap_types[i].name))
  2163. X!         return(trap_types[i].type);
  2164. X      return ERR;
  2165. X  }
  2166. X  
  2167. X--- 680,686 ----
  2168. X      
  2169. X      for(i=0; i < TRAPNUM - 1; i++)
  2170. X          if(!strcmp(s,trap_types[i].name))
  2171. X!         return((int)trap_types[i].type);
  2172. X      return ERR;
  2173. X  }
  2174. X  
  2175. X*** src/Old/lev_main.c    Mon Feb 19 18:10:04 1990
  2176. X--- src/lev_main.c    Thu Feb 15 19:06:08 1990
  2177. X***************
  2178. X*** 8,13 ****
  2179. X--- 8,18 ----
  2180. X   */
  2181. X  
  2182. X  /* #include "hack.h"    /* uncomment for the Mac */
  2183. X+ 
  2184. X+ #ifdef AMIGA
  2185. X+ #include "hack.h"
  2186. X+ #undef exit
  2187. X+ #endif
  2188. X  #include <stdio.h>
  2189. X  
  2190. X  #define MAX_ERRORS    25
  2191. X***************
  2192. X*** 16,22 ****
  2193. X--- 21,47 ----
  2194. X  char *fname = "(stdin)";
  2195. X  int fatal_error = 0;
  2196. X  
  2197. X+ #ifdef LATTICE
  2198. X+ long *alloc(unsigned int);
  2199. X+ #ifdef exit
  2200. X+ #undef exit
  2201. X+ #endif
  2202. X+ #include <stdlib.h>
  2203. X+ #endif
  2204. X+ 
  2205. X+ #ifdef    FDECL
  2206. X+ int  FDECL (main, (int, char **));
  2207. X+ int  NDECL (yyparse);
  2208. X+ void FDECL (yyerror, (char *));
  2209. X+ void FDECL (yywarning, (char *));
  2210. X+ int  NDECL (yywrap);
  2211. X+ #endif
  2212. X+ 
  2213. X+ #ifdef LSC
  2214. X+ _main(argc, argv)
  2215. X+ #else
  2216. X  main(argc, argv) 
  2217. X+ #endif
  2218. X  int argc;
  2219. X  char **argv;
  2220. X  {
  2221. X***************
  2222. X*** 76,82 ****
  2223. X          yyparse();
  2224. X      else             /* Otherwise every argument is a filename */
  2225. X          for(i=1; i<argc; i++) {
  2226. X! #ifdef VMS
  2227. X              extern FILE *yyin;
  2228. X              yyin = fin = fopen(argv[i], "r");
  2229. X  #else
  2230. X--- 101,107 ----
  2231. X          yyparse();
  2232. X      else             /* Otherwise every argument is a filename */
  2233. X          for(i=1; i<argc; i++) {
  2234. X! #if defined(VMS) || defined(AZTEC_C)
  2235. X              extern FILE *yyin;
  2236. X              yyin = fin = fopen(argv[i], "r");
  2237. X  #else
  2238. X***************
  2239. X*** 99,105 ****
  2240. X   * MAX_ERRORS wouldn't be reasonable.
  2241. X   */
  2242. X  
  2243. X! yyerror(s)
  2244. X  char *s;
  2245. X  {
  2246. X      fprintf(stderr,"%s : line %d : %s\n",fname,line_number, s);
  2247. X--- 124,130 ----
  2248. X   * MAX_ERRORS wouldn't be reasonable.
  2249. X   */
  2250. X  
  2251. X! void yyerror(s)
  2252. X  char *s;
  2253. X  {
  2254. X      fprintf(stderr,"%s : line %d : %s\n",fname,line_number, s);
  2255. X***************
  2256. X*** 113,119 ****
  2257. X   * Just display a warning (that is : a non fatal error)
  2258. X   */
  2259. X  
  2260. X! yywarning(s)
  2261. X  char *s;
  2262. X  {
  2263. X      fprintf(stderr,"%s : line %d : WARNING : %s\n",fname,line_number,s);
  2264. X--- 138,144 ----
  2265. X   * Just display a warning (that is : a non fatal error)
  2266. X   */
  2267. X  
  2268. X! void yywarning(s)
  2269. X  char *s;
  2270. X  {
  2271. X      fprintf(stderr,"%s : line %d : WARNING : %s\n",fname,line_number,s);
  2272. X*** src/Old/lock.c    Mon Feb 19 18:10:19 1990
  2273. X--- src/lock.c    Wed Feb 14 18:38:07 1990
  2274. X***************
  2275. X*** 4,10 ****
  2276. X  
  2277. X  #include    "hack.h"
  2278. X  
  2279. X! static struct {
  2280. X      int    door_or_box, picktyp;
  2281. X      struct rm  *door;
  2282. X      struct obj *box;
  2283. X--- 4,19 ----
  2284. X  
  2285. X  #include    "hack.h"
  2286. X  
  2287. X! #ifndef OVERLAY
  2288. X! static int NDECL(picklock);
  2289. X! static int NDECL(forcelock);
  2290. X! #else
  2291. X! int NDECL(picklock);
  2292. X! int NDECL(forcelock);
  2293. X! #endif
  2294. X! static boolean FDECL(obstructed,(int,int));
  2295. X! 
  2296. X! VSTATIC struct xlock_s {
  2297. X      int    door_or_box, picktyp;
  2298. X      struct rm  *door;
  2299. X      struct obj *box;
  2300. X***************
  2301. X*** 11,16 ****
  2302. X--- 20,27 ----
  2303. X      int chance, usedtime;
  2304. X  } xlock;
  2305. X  
  2306. X+ #ifdef OVLB
  2307. X+ 
  2308. X  #ifndef OVERLAY
  2309. X  static
  2310. X  #endif
  2311. X***************
  2312. X*** 146,154 ****
  2313. X--- 157,171 ----
  2314. X      return((xlock.usedtime = 0));
  2315. X  }
  2316. X  
  2317. X+ #endif /* OVLB */
  2318. X+ #ifdef OVL0
  2319. X+ 
  2320. X  void
  2321. X  reset_pick() { xlock.usedtime = 0; }
  2322. X  
  2323. X+ #endif /* OVL0 */
  2324. X+ #ifdef OVLB
  2325. X+ 
  2326. X  int
  2327. X  pick_lock(pick) /* pick a lock with a given object */
  2328. X      register struct    obj    *pick;
  2329. X***************
  2330. X*** 157,162 ****
  2331. X--- 174,182 ----
  2332. X      register struct rm    *door;
  2333. X      register struct obj    *otmp;
  2334. X  
  2335. X+ #ifdef __GNULINT__
  2336. X+     ch = 0;        /* GCC myopia */
  2337. X+ #endif
  2338. X      picktyp = pick->otyp;
  2339. X      if(xlock.usedtime && picktyp == xlock.picktyp) {
  2340. X  
  2341. X***************
  2342. X*** 375,382 ****
  2343. X      y = u.uy + u.dy;
  2344. X      if((x == u.ux) && (y == u.uy)) return(0);
  2345. X  
  2346. X!     if(MON_AT(x, y) && (mtmp = m_at(x,y))->mimic && 
  2347. X!                 mtmp->mappearance == CLOSED_DOOR_SYM &&
  2348. X                  !Protection_from_shape_changers) {
  2349. X          stumble_onto_mimic(mtmp);
  2350. X          return(1);
  2351. X--- 395,403 ----
  2352. X      y = u.uy + u.dy;
  2353. X      if((x == u.ux) && (y == u.uy)) return(0);
  2354. X  
  2355. X!     if(MON_AT(x, y) && (mtmp = m_at(x,y))->mimic &&
  2356. X!                 mtmp->m_ap_type == M_AP_FURNITURE &&
  2357. X!                 mtmp->mappearance == S_cdoor &&
  2358. X                  !Protection_from_shape_changers) {
  2359. X          stumble_onto_mimic(mtmp);
  2360. X          return(1);
  2361. X***************
  2362. X*** 463,470 ****
  2363. X          return(1);
  2364. X      }
  2365. X  
  2366. X!     if(MON_AT(x, y) && (mtmp = m_at(x,y))->mimic && 
  2367. X!                 mtmp->mappearance == CLOSED_DOOR_SYM &&
  2368. X                  !Protection_from_shape_changers) {
  2369. X          stumble_onto_mimic(mtmp);
  2370. X          return(1);
  2371. X--- 484,492 ----
  2372. X          return(1);
  2373. X      }
  2374. X  
  2375. X!     if(MON_AT(x, y) && (mtmp = m_at(x,y))->mimic &&
  2376. X!                 mtmp->m_ap_type == M_AP_FURNITURE && 
  2377. X!                 mtmp->mappearance == S_cdoor &&
  2378. X                  !Protection_from_shape_changers) {
  2379. X          stumble_onto_mimic(mtmp);
  2380. X          return(1);
  2381. X***************
  2382. X*** 524,530 ****
  2383. X              /* returns 1 if something happened */
  2384. X      register struct obj *obj, *otmp;    /* obj *is* a box */
  2385. X  {
  2386. X!     register boolean res;
  2387. X  
  2388. X      switch(otmp->otyp) {
  2389. X          case WAN_LOCKING:
  2390. X--- 546,552 ----
  2391. X              /* returns 1 if something happened */
  2392. X      register struct obj *obj, *otmp;    /* obj *is* a box */
  2393. X  {
  2394. X!     register boolean res = 0;
  2395. X  
  2396. X      switch(otmp->otyp) {
  2397. X          case WAN_LOCKING:
  2398. X***************
  2399. X*** 683,685 ****
  2400. X--- 705,709 ----
  2401. X      return(otmp->olet == WEAPON_SYM && objects[otmp->otyp].oc_bimanual);
  2402. X  }
  2403. X  #endif /* STUPID_CPP */
  2404. X+ 
  2405. X+ #endif /* OVLB */
  2406. X
  2407. END_OF_FILE
  2408. if test 53710 -ne `wc -c <'patch7.01'`; then
  2409.     echo shar: \"'patch7.01'\" unpacked with wrong size!
  2410. fi
  2411. # end of 'patch7.01'
  2412. echo shar: End of archive 15 \(of 30\).
  2413. cp /dev/null ark15isdone
  2414. MISSING=""
  2415. for I in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 ; do
  2416.     if test ! -f ark${I}isdone ; then
  2417.     MISSING="${MISSING} ${I}"
  2418.     fi
  2419. done
  2420. if test "${MISSING}" = "" ; then
  2421.     echo You have unpacked all 30 archives.
  2422.     rm -f ark[1-9]isdone ark[1-9][0-9]isdone
  2423. else
  2424.     echo You still need to unpack the following archives:
  2425.     echo "        " ${MISSING}
  2426. fi
  2427. ##  End of shell archive.
  2428. exit 0
  2429.